using System;
using System.Collections.Generic;
using System.Reflection;
using System.Runtime.InteropServices;

using ILRuntime.CLR.TypeSystem;
using ILRuntime.CLR.Method;
using ILRuntime.Runtime.Enviorment;
using ILRuntime.Runtime.Intepreter;
using ILRuntime.Runtime.Stack;
using ILRuntime.Reflection;
using ILRuntime.CLR.Utils;
using System.Linq;

namespace ILRuntime.Runtime.Generated
{
    unsafe class huqiang_UIComposite_PopItemMod_Binding
    {
        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
        {
            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
            MethodBase method;
            FieldInfo field;
            Type[] args;
            Type type = typeof(huqiang.UIComposite.PopItemMod);

            field = type.GetField("Item", flag);
            app.RegisterCLRFieldGetter(field, get_Item_0);
            app.RegisterCLRFieldSetter(field, set_Item_0);
            app.RegisterCLRFieldBinding(field, CopyToStack_Item_0, AssignFromStack_Item_0);
            field = type.GetField("Text", flag);
            app.RegisterCLRFieldGetter(field, get_Text_1);
            app.RegisterCLRFieldSetter(field, set_Text_1);
            app.RegisterCLRFieldBinding(field, CopyToStack_Text_1, AssignFromStack_Text_1);
            field = type.GetField("Check", flag);
            app.RegisterCLRFieldGetter(field, get_Check_2);
            app.RegisterCLRFieldSetter(field, set_Check_2);
            app.RegisterCLRFieldBinding(field, CopyToStack_Check_2, AssignFromStack_Check_2);
            field = type.GetField("data", flag);
            app.RegisterCLRFieldGetter(field, get_data_3);
            app.RegisterCLRFieldSetter(field, set_data_3);
            app.RegisterCLRFieldBinding(field, CopyToStack_data_3, AssignFromStack_data_3);
            field = type.GetField("Index", flag);
            app.RegisterCLRFieldGetter(field, get_Index_4);
            app.RegisterCLRFieldSetter(field, set_Index_4);
            app.RegisterCLRFieldBinding(field, CopyToStack_Index_4, AssignFromStack_Index_4);


            app.RegisterCLRCreateDefaultInstance(type, () => new huqiang.UIComposite.PopItemMod());
            app.RegisterCLRCreateArrayInstance(type, s => new huqiang.UIComposite.PopItemMod[s]);

            args = new Type[]{};
            method = type.GetConstructor(flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, Ctor_0);

        }



        static object get_Item_0(ref object o)
        {
            return ((huqiang.UIComposite.PopItemMod)o).Item;
        }

        static StackObject* CopyToStack_Item_0(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.UIComposite.PopItemMod)o).Item;
            object obj_result_of_this_method = result_of_this_method;
            if(obj_result_of_this_method is CrossBindingAdaptorType)
            {    
                return ILIntepreter.PushObject(__ret, __mStack, ((CrossBindingAdaptorType)obj_result_of_this_method).ILInstance);
            }
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_Item_0(ref object o, object v)
        {
            ((huqiang.UIComposite.PopItemMod)o).Item = (huqiang.UIEvent.UserEvent)v;
        }

        static StackObject* AssignFromStack_Item_0(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            huqiang.UIEvent.UserEvent @Item = (huqiang.UIEvent.UserEvent)typeof(huqiang.UIEvent.UserEvent).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            ((huqiang.UIComposite.PopItemMod)o).Item = @Item;
            return ptr_of_this_method;
        }

        static object get_Text_1(ref object o)
        {
            return ((huqiang.UIComposite.PopItemMod)o).Text;
        }

        static StackObject* CopyToStack_Text_1(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.UIComposite.PopItemMod)o).Text;
            object obj_result_of_this_method = result_of_this_method;
            if(obj_result_of_this_method is CrossBindingAdaptorType)
            {    
                return ILIntepreter.PushObject(__ret, __mStack, ((CrossBindingAdaptorType)obj_result_of_this_method).ILInstance);
            }
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_Text_1(ref object o, object v)
        {
            ((huqiang.UIComposite.PopItemMod)o).Text = (huqiang.Core.HGUI.HText)v;
        }

        static StackObject* AssignFromStack_Text_1(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            huqiang.Core.HGUI.HText @Text = (huqiang.Core.HGUI.HText)typeof(huqiang.Core.HGUI.HText).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            ((huqiang.UIComposite.PopItemMod)o).Text = @Text;
            return ptr_of_this_method;
        }

        static object get_Check_2(ref object o)
        {
            return ((huqiang.UIComposite.PopItemMod)o).Check;
        }

        static StackObject* CopyToStack_Check_2(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.UIComposite.PopItemMod)o).Check;
            object obj_result_of_this_method = result_of_this_method;
            if(obj_result_of_this_method is CrossBindingAdaptorType)
            {    
                return ILIntepreter.PushObject(__ret, __mStack, ((CrossBindingAdaptorType)obj_result_of_this_method).ILInstance);
            }
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_Check_2(ref object o, object v)
        {
            ((huqiang.UIComposite.PopItemMod)o).Check = (huqiang.Core.HGUI.UIElement)v;
        }

        static StackObject* AssignFromStack_Check_2(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            huqiang.Core.HGUI.UIElement @Check = (huqiang.Core.HGUI.UIElement)typeof(huqiang.Core.HGUI.UIElement).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            ((huqiang.UIComposite.PopItemMod)o).Check = @Check;
            return ptr_of_this_method;
        }

        static object get_data_3(ref object o)
        {
            return ((huqiang.UIComposite.PopItemMod)o).data;
        }

        static StackObject* CopyToStack_data_3(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.UIComposite.PopItemMod)o).data;
            object obj_result_of_this_method = result_of_this_method;
            if(obj_result_of_this_method is CrossBindingAdaptorType)
            {    
                return ILIntepreter.PushObject(__ret, __mStack, ((CrossBindingAdaptorType)obj_result_of_this_method).ILInstance, true);
            }
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method, true);
        }

        static void set_data_3(ref object o, object v)
        {
            ((huqiang.UIComposite.PopItemMod)o).data = (System.Object)v;
        }

        static StackObject* AssignFromStack_data_3(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Object @data = (System.Object)typeof(System.Object).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            ((huqiang.UIComposite.PopItemMod)o).data = @data;
            return ptr_of_this_method;
        }

        static object get_Index_4(ref object o)
        {
            return ((huqiang.UIComposite.PopItemMod)o).Index;
        }

        static StackObject* CopyToStack_Index_4(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.UIComposite.PopItemMod)o).Index;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static void set_Index_4(ref object o, object v)
        {
            ((huqiang.UIComposite.PopItemMod)o).Index = (System.Int32)v;
        }

        static StackObject* AssignFromStack_Index_4(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Int32 @Index = ptr_of_this_method->Value;
            ((huqiang.UIComposite.PopItemMod)o).Index = @Index;
            return ptr_of_this_method;
        }



        static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* __ret = ILIntepreter.Minus(__esp, 0);

            var result_of_this_method = new huqiang.UIComposite.PopItemMod();

            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }


    }
}
